import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path' // 引入 path 模块

export default defineConfig({
  plugins: [vue()],
  resolve: {
    // 添加路径别名配置
    alias: {
      '@': path.resolve(__dirname, 'src') // 将 @ 指向 src 目录
    }
  },
  build: {
    rollupOptions: {
      output: {
        entryFileNames: 'server_manager/[name].[hash].js',
        chunkFileNames: 'server_manager/[name].[hash].js',
        assetFileNames: 'server_manager/[name].[hash].[ext]'
      }
    }
  }
})